{namespace vh=In2code\Powermail\ViewHelpers}
<f:layout name="Default" />

Render Powermail Form
{forms} 			All Forms with their Pages and their Fields


<f:section name="main">

	<f:flashMessages class="powermail_message powermail_message_error" />

	<f:if condition="{forms}">
		<f:then>
			<f:for each="{forms}" as="form">
				<f:form
						action="{action}"
						name="field"
						enctype="multipart/form-data"
						additionalAttributes="{vh:Validation.EnableParsleyAndAjax(form:form)}"
						class="powermail_form powermail_form_{form.uid} {form.css} {vh:Misc.MorestepClass(activate:settings.main.moresteps, class:'powermail_morestep')}">

					<h3 class="hide">{form.title}</h3>
					<f:render partial="Misc/FormError" arguments="{_all}" />

					<f:for each="{form.pages}" as="page">
						<fieldset class="powermail_fieldset powermail_fieldset_{page.uid} {page.css} stop-btm">
							<legend class="powermail_legend">{page.title}</legend>
							<f:for each="{page.fields}" as="field">
								<f:render partial="Form/{vh:String.Upper(string:field.type)}" arguments="{field:field}" />
							</f:for>
						</fieldset>
					</f:for>

					<f:form.hidden name="mail[form]" value="{form.uid}" class="powermail_form_uid" />
					<f:render partial="Misc/HoneyPod" arguments="{form:form}" />
				</f:form>
			</f:for>
		</f:then>
		<f:else>
			<f:translate key="error_no_form" />
		</f:else>
	</f:if>

</f:section>